package com.zpark.config;

import javax.validation.constraints.*;

public class User {

    private Integer id;

    @Size(min = 5, max = 10, message = "{user.name.size}")
    private String name;

    @NotNull(message = "{user.address.notnull}")
    private String address;

    @DecimalMax(value = "200", message = "{user.age.size}")
    @DecimalMin(value = "1", message = "{user.age.size}")
    private Integer age;

    @Email(message = "{user.email.pattern}")
    @NotNull(message = "{user.email.notnull}")
    private String email;

    // 省略 getter / setter
}

